unit Unitgy;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, dxGDIPlusClasses, Vcl.ExtCtrls;

type
  TFormgy = class(TForm)
    Image1: TImage;
    procedure Image1DblClick(Sender: TObject);
    procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Formgy: TFormgy;

implementation

{$R *.dfm}

procedure TFormgy.Image1DblClick(Sender: TObject);
begin
  Close;
end;

procedure TFormgy.Image1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
ReleaseCapture;
 SendMessage(Self.Handle,WM_NCLBUTTONDOWN,HTCAPTION,0);
end;

end.
